import unittest
from XTestRunner import HTMLTestRunner
from Tools import send_email
if __name__ == '__main__':
    unit=unittest.defaultTestLoader.discover(start_dir='case', pattern='TestCase.py')
    with open('baogao.html', 'wb')as f:
        runner=HTMLTestRunner(stream=f,title='测试报告',description='个人中心',rerun=1,language='zh-CN')
        runner.run(unit)
    send_email()